<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>成都博物馆内容管理平台</title>
    <link rel="stylesheet" href="../css/ext/bootstrap.min.css">
    <link rel="stylesheet" href="../css/common/base.css">
    <script src="../js/ext/jquery-1.11.3.js"></script>
    <script src="../js/ext/jquery-ui.min.js"></script>
    <script src="../js/ext/bootstrap.min.js"></script>
    <script src="../js/base.js"></script>
</head>
<body>
<% include ../common/header.jsp %>
<div class="main">
    <% include ../common/menu.jsp %>
    <div class="main-content">
        <div class="wrapper">
            <div class="content-title">
                <!--面包屑-->
                <ol class="breadcrumb">
                    <li>内容管理</li>
                    <li>栏目管理</li>
                    <li class="active">编辑</li>
                </ol>
            </div><!--content-title-->
            <form action="" method="post">
                <div class="form-list">
                    <label class="l80"><i class="ic ic-dotred"></i>名称</label>
                    <input id="name" class="i280" type="text" name="" maxlength="30">
                    <em>不超过30个字符，可由中英文数字及中英文符号组成</em>
                </div>
                <div class="form-list">
                    <label class="l80"><i class="ic ic-dotred"></i>类型</label>
                    <select id="sel-type" class="i280">
                        <option value="1">展品栏目</option>
                        <option value="2">讲座栏目</option>
                    </select>
                    <em id="em-sel"><i class="ic ic-right"></i></em>
                </div>
                <div class="form-list textarea">
                    <label class="l80 pl16">文字说明</label>
                    <textarea id="des" class="t594" name="" maxlength="200"></textarea>
                    <em>不超过200个字符</em>
                </div>
                <div class="form-list textarea">
                    <label class="l80 pl16">备注</label>
                    <textarea id="remark" class="t594" name="" maxlength="200"></textarea>
                    <em>不超过200个字符</em>
                </div>
                <div class="form-list" style="margin-left: 88px;width: 880px">
                    <a id="relate" class="btn btn-relate" href="/assembleRelate"><span>关联内容</span></a>
                    <input class="btn pull-right" id="sort" type="button" value="排序">
                    <input class="btn pull-right" id="cancel-sort" type="button" value="取消排序" style="display: none">
                    <div class="list-relate" id="sortable">
                        <% for(var i=1; i<9; i++) {%>
                        <ul class="relate-item">
                            <li class="relate-id">88888<%= i %></li>
                            <li class="relate-name">2015年度四川省文化馆党建工作述职情况报告2015年度四川省文化馆党建工作述职情况报告</li>
                            <li class="relate-img"><img src="../images/base/img-item.jpg" alt=""></li>
                            <li class="relate-time">8888-88-88</li>
                            <li class="relate-operate">
                                <a href="javascript:;"><i class="ic ic-remove"></i></a>
                            </li>
                        </ul>
                        <% } %>
                    </div>
                </div>
                <div style="margin-left: 88px">
                    <input class="btn btn-submit" type="submit" value="提交">
                    <a class="btn btn-cancel" style="margin-left: 40px"><span>取消</span></a>
                </div>
            </form>
        </div><!--wrapper-->
    </div><!--main-content-->
</div>
<script>
    $(function () {
        /**关联列表排序功能*/
        list_sort();
        /**进入页面时判断关联类型是否可选*/
        relate_sel();
        /* 关联 */
        $('#relate').click(function(){
//            var columnEntity_type=$('#columnEntity-type').val();
//            var columnModel_id=$('#columnModel-id').val();
//            var onlineState=$('#onlineState').val();
//            var columnEntity_name=$('#columnEntity-name').val();
//            var columnEntity_descInfo=$('#columnEntity-descInfo').val();
//            var url='../columnManAction/loadRelateContentInfo?columnEntity.id='+columnModel_id+'&columnEntity.type='+columnEntity_type
//                    +'&columnEntity.onlineState='+onlineState+'&columnEntity.name='+columnEntity_name+'&columnEntity.descInfo='+columnEntity_descInfo;
//            location.href = url;
        });



        /*提交时验证*/
        $(document).submit(function () {
            /**提交前解除下拉框禁用*/
            var sel_type = $('#sel-type');//类型下拉框
            sel_type.attr('disabled', false);
            $('#em-sel').show();

            var mark = 0;
            if (check_remark())mark++;
            if (check_relate())mark++;
            if (mark == 3) {
                $('.btn-submit').val('提交中...').attr('disabled',true);
                setTimeout("$('.btn-submit').val('提交').attr('disabled',false)",300);
            }else{

            }
            return false;
        })
    })
</script>
</body>
</html>